<?php
echo "Student list:<br>";
include('Student.php');
$students = array();

//Add students
$first = new Student("Doe", "John",status:"Freshman");
$first->add_email('home', 'john@doe.com');
$first->add_email('work', 'jdoe@mcdonalds.com');
$first->add_grade(65);
$first->add_grade(75);
$first->add_grade(55);
$students['j123'] = $first;

$second = new Student("Einstein", "Albert",status:"Junior");
$second->add_email('home', 'albert@braniacs.com');
$second->add_email('work1', 'a_einstein@bcit.ca');
$second->add_email('work2', 'albert@physics.mit.edu');
$second->add_grade(95);
$second->add_grade(80);
$second->add_grade(50);
$students['a456'] = $second;

$third = new Student("Guangheng", "Huang",status:"Junior");
$third->add_email('home', 'hgh123456@qq.com');
$third->add_email('work', 'hgh123456@dd.com');
$third->add_grade(70);
$third->add_grade(75);
$third->add_grade(70);
$students['h123'] = $third;

$fourth = new Student("GS", "Y",status:"Senior");
$fourth->add_email('home', 'YGS456@qq.com');
$fourth->add_email('work', 'YGS456@dd.com');
$fourth->add_grade(70);
$fourth->add_grade(75);
$fourth->add_grade(70);
$students['Y123456'] = $fourth;

foreach ($students as $student)
echo $student->toString();
?>